import java.util.Random;
import java.util.Scanner;

public class shitou {
    public static void main(String[] args) {
        int i;
        int lose = 0;
        int win = 0;
        int ping = 0;
        System.out.println("程序已启动");
        System.out.println("剪刀 石头 布");
        for (i = 0; i < 5; i++) {
            int randomNumber = new Random().nextInt(3) + 1;
            Scanner reader = new Scanner(System.in);
            String n = reader.next();


            System.out.println(randomNumber);
            if (randomNumber == 1) {

                System.out.println("电脑本次出的是剪刀");
            } else if (randomNumber == 2) {
                System.out.println("电脑本次出的是石头");
            } else if (randomNumber == 3) {
                System.out.println("电脑本次出的是布");
            }


            if (n.equals("剪刀") && randomNumber == 2) {//我剪刀，电脑石头
                System.out.println("你输了");
                lose++;
            } else if (n.equals("剪刀") && randomNumber == 3) {//我剪刀，电脑布
                System.out.println("你赢了");
                win++;
            } else if (n.equals("石头") && randomNumber == 3) {//我石头，电梯布
                System.out.println("你输了");
                lose++;
            } else if (n.equals("石头") && randomNumber == 1) {
                System.out.println("你赢了");
                win++;
            } else if (n.equals("布") && randomNumber == 1) {
                System.out.println("你输了");
                lose++;
            } else if (n.equals("布") && randomNumber == 2) {
                System.out.println("你赢了");
                win++;
            } else {
                System.out.println("平局");
                ping++;
            }

        }
        System.out.println("本次游戏你赢了" + win + "局,输了" + lose + "局，有" + ping + "局平局");
        int c = 5 - win - lose;
        if (win == c) {
            System.out.println("和局");
        } else if (win > lose) {
            System.out.println("您赢了");
        } else {
            System.out.println("您输了");
        }
    }
}
